
/**
 *  This function is used to update array changed on category page
 *  When category info is changed, arrayChangedName will be updated
 *  arrayChangedName as following:
	[
	] 
 */
function updateArrayCategory(value, el, arrayChangedName){
	var isExisting = false,
		idTextChanged = $(el).closest("li").attr("data-id");
		
	for (var i=0; i< arrayChangedName.length;i++){
		if ( idTextChanged == arrayChangedName[i][0]){
			arrayChangedName[i][1] = value;
			//set isExisting to true if this value already existing in arrayChangedName
			isExisting = true;
			break;
		}
	}
	if (!isExisting){
		arrayChangedName.push([idTextChanged,value]);
		isExisting = false;
	}
}
